# #!/usr/bin/env python
# import difflib
# import timeit
#
#
# fromfile = 'airport-frequencies.csv'
# tofile = 'airport-frequencies-1.csv'
# c = open(fromfile, 'U').readlines()
# d = open(tofile, 'U').readlines()
#
# # a = [line.strip() for line in open('airport-frequencies.csv', 'r')]
# # b = [line.strip() for line in open('airport-frequencies-1.csv', 'r')]
# # b = ["Being relatively new to python I'm not sure what the  common idiom is,",
# #        " but the simplest thing I can think of is just using a emodule instead of a class.",
# #        " What would have been instance methods on youar class become just functions in ",
# #        "the module and any data just becomes variables in the module instead of members of the class.",
# #        "tadADAASDAd asfasfd n the module instead of members of the class.",
# #        "I suspect this is the pythonic approach to solving the type of problem that people use singletons for."]
#
# def ndif(a,b):
#     diff = difflib.ndiff(a, b)
#     with(open('ndiff.txt','w+') ) as fw:
#         fw.write(''.join(diff),) #''.join(diff),
#
#
# def dif(a, b):
#     diff = difflib.Differ().compare(a, b)
#     with(open('compare.txt','w+') ) as fw:
#         fw.write(''.join(diff),)
#
#
# def uon(a, b):
#     diff = difflib.unified_diff(a,b,n=0)
#     with(open('unified_diff.txt','w+') ) as fw:
#         fw.write(''.join(diff),)
#
#
# def cof(a, b):
#     diff = difflib.context_diff(a,b,n=0)
#     with(open('context_diff.txt','w+') ) as fw:
#         fw.write(''.join(diff),)
#
# def hot(a, b):
#     diff = difflib.HtmlDiff().make_file(fromlines=a, tolines=b, context=True, numlines=0)
#     with(open('HtmlDiff_true.html','w+') ) as fw:
#         fw.write(''.join(diff),)
#
# if __name__ == '__main__':
#     t = timeit.timeit(stmt='test1.ndif(test1.c, test1.d)', setup='import test1', number=1)
#     print 'ndif: ', t
#     # for dt in diff:
#     #     print dt
#
#     print "-------------------------"
#     t = timeit.timeit(stmt='test1.dif(test1.c, test1.d)', setup='import test1', number=1)
#     print 'dif', t
#
#     print "-------------------------"
#     t = timeit.timeit(stmt='test1.uon(test1.c, test1.d)', setup='import test1', number=1)
#     print 'dif', t
#
#     print "-------------------------"
#     t = timeit.timeit(stmt='test1.cof(test1.c, test1.d)', setup='import test1', number=1)
#     print 'dif', t
#
#     print "-------------------------"
#     t = timeit.timeit(stmt='test1.hot(test1.c, test1.d)', setup='import test1', number=1)
#     print 'dif', t
